package com.training.hatton.dropboxclient.utill;

import android.os.ResultReceiver;

import com.training.hatton.base.RequestDataWrapper;
import com.training.hatton.dropboxclient.content.Metadata;
import com.training.hatton.dropboxclient.processor.DeleteFileProcessor;
import com.training.hatton.dropboxclient.processor.DownloadFileProcessor;
import com.training.hatton.dropboxclient.processor.DownloadMetadataProcessor;
import com.training.hatton.dropboxclient.processor.common.DropboxListModelProcessor;

public class ProcessorHelperFactory {
	public static final int DELETE_FILE_PROCESSOR = 0;
	public static final int DOWNLOAD_FILE_PROCESSOR = 1;
	public static final int DOWNLOAD_METADATA_PROCESSOR = 2;
	
	
	
	public static DropboxListModelProcessor<Metadata> getProcessor(int criteria, RequestDataWrapper dataWrapper, ResultReceiver resultReceiver){
		switch (criteria) { 
		case DELETE_FILE_PROCESSOR:	 
			return new DeleteFileProcessor(dataWrapper, resultReceiver);
		case DOWNLOAD_FILE_PROCESSOR:
			return new DownloadFileProcessor(dataWrapper, resultReceiver);
		case DOWNLOAD_METADATA_PROCESSOR:
			return new DownloadMetadataProcessor(dataWrapper, resultReceiver);
		}
		return null;
	}
	
}
